package com.example.feign.domin.bo;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * 京东订单
 *
 * @author huang
 * @create 2019-10-09 10:06
 **/
@Data
public class JdOrderDataBO {

    @ApiModelProperty(value = "数据")
    private Object data;

    @ApiModelProperty(value = "是否有更多")
    private Boolean hasMore;

    @ApiModelProperty(value = "数据列表")
    private List<JdOrderListBO> list;

    public List<JdOrderListBO> getList() {
        if (StringUtils.isNotBlank(data.toString())) {
            return JSON.parseArray(JSON.toJSONString(data),JdOrderListBO.class);
        }
        return null;
    }
}
